/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sorting_searching;

/**
 *
 * @author Administrator
 */
public class SIndex implements SIndexInterface
{
    private int start;
    private int end;
    /**
     * This Constructor is used create new object with new sorted or searched indices
     * @param s start index in the array
     * @param e end index
     */
    public SIndex(int s, int e)
    {
        start = s;
        end = e;
    }
    /**
     * This method is used to get endIndex
     * @return endIndex
     */
    public int getEnd()
    {
        return end;
    }
    /**
     * This method is used to set endIndex
     * @param end new endIndex
     */
    public void setEnd(int end)
    {
        this.end = end;
    }
    /**
     * This method is used to get startIndex
     * @return startIndex
     */
    public int getStart()
    {
        return start;
    }
    /**
     * This method is used to set startIndex
     * @param start new startIndex
     */
    public void setStart(int start)
    {
        this.start = start;
    }
    /**
     * This method is used to set values of start and end index in same tome
     * @param newStart new start index
     * @param newEnd new end index
     */
    public void setValues(int newStart,int newEnd)
    {
        this.setStart(newStart);
        this.setEnd(newEnd);
    }
}
